package com.aiwiown.face.response.faceid;

import com.aiwiown.face.ApiResponse;
import com.aiwiown.face.domain.ocrid.Legality;
import com.aiwiown.face.domain.ocrid.RectDict;
import com.aiwiown.face.domain.orc.OCRIdCardDict;
import com.aiwiown.face.internal.mapping.ApiField;

/**
 * OCRIdCardV3Response
 * Date: 2020/7/21 0021
 * Time: 9:37
 *
 * @author tang.xiaosheng@qq.com
 */
public class OCRIdCardV3Response extends ApiResponse {

    private static final long serialVersionUID = 5773983135462486041L;
    /**
     * 识别的结果信息：
     * <p>
     * 1001: 表示识别出是一张没有问题的身份证；
     * 1002: 表示识别出是一张身份证，但在识别结果中存在异常情况，其中异常情况包括：
     * 有字段没有识别出来
     * 识别的结果中存在逻辑问题（logic字段为1）
     * 识别的字段上存在图片质量问题（quality字段低于默认的阈值）
     * 识别的结果上存在合法性问题（legality字段的五分类结果不为真实身份证）
     * 注：其他错误码请预留处理方案，我们可能增加其他情况的返回。
     */
    @ApiField("result")
    private Integer result;
    /**
     * 表示身份证图片的完整性，平整性；
     * <p>
     * 0: 表示图片里面的身份证是完整的
     * 1: 表示图片里面的身份证不完整，但其关键信息内容区域全部都在图片内
     * 2: 表示图片里面的身份证不完整，且有部分内容在区域外
     * 注：其他错误码请预留处理方案，我们可能增加其他情况的返回。
     */
    @ApiField("completeness")
    private Integer completeness;
    /**
     * 0: 表示传入的图片为身份证人像面
     * 1: 表示传入的图片为身份证国徽面
     */
    @ApiField("side")
    private Integer side;

    @ApiField("name")
    private OCRIdCardDict name;

    @ApiField("gender")
    private OCRIdCardDict gender;

    @ApiField("address")
    private OCRIdCardDict address;

    /**
     * 返回图片里面，身份证卡片的四点坐标，坐标的开始位置为图片左上角，具体返回示例如下
     * "rt"{ "y":43, "x":927 } //右上角坐标 "lt"{ "y":33, "x":58 } //左上角坐标 "lb"{ "y":586, "x":59 } //左下角坐标 "rb"{ "y":580, "x":920 } //右下角坐标
     * 当字段的区域没有识别出来的时候，各个坐标点的x和y均返回为0。
     */
    @ApiField("card_rect")
    private RectDict cardRect;

    @ApiField("idcard_number")
    private OCRIdCardDict idCardNumber;

    @ApiField("birth_month")
    private OCRIdCardDict birthMonth;

    @ApiField("portrait")
    private OCRIdCardDict portrait;

    @ApiField("birth_day")
    private OCRIdCardDict birthDay;

    @ApiField("nationality")
    private OCRIdCardDict nationality;

    @ApiField("birth_year")
    private OCRIdCardDict birthYear;

    @ApiField("legality")
    private Legality legality;

    @ApiField("issued_by")
    private OCRIdCardDict issuedBy;

    @ApiField("valid_date_end")
    private OCRIdCardDict validDateEnd;

    @ApiField("valid_date_start")
    private OCRIdCardDict validDateStart;

    public Integer getResult() {
        return result;
    }

    public void setResult(Integer result) {
        this.result = result;
    }

    public Integer getCompleteness() {
        return completeness;
    }

    public void setCompleteness(Integer completeness) {
        this.completeness = completeness;
    }

    public Integer getSide() {
        return side;
    }

    public void setSide(Integer side) {
        this.side = side;
    }

    public OCRIdCardDict getName() {
        return name;
    }

    public void setName(OCRIdCardDict name) {
        this.name = name;
    }

    public OCRIdCardDict getGender() {
        return gender;
    }

    public void setGender(OCRIdCardDict gender) {
        this.gender = gender;
    }

    public OCRIdCardDict getAddress() {
        return address;
    }

    public void setAddress(OCRIdCardDict address) {
        this.address = address;
    }

    public RectDict getCardRect() {
        return cardRect;
    }

    public void setCardRect(RectDict cardRect) {
        this.cardRect = cardRect;
    }

    public OCRIdCardDict getIdCardNumber() {
        return idCardNumber;
    }

    public void setIdCardNumber(OCRIdCardDict idCardNumber) {
        this.idCardNumber = idCardNumber;
    }

    public OCRIdCardDict getBirthMonth() {
        return birthMonth;
    }

    public void setBirthMonth(OCRIdCardDict birthMonth) {
        this.birthMonth = birthMonth;
    }

    public OCRIdCardDict getPortrait() {
        return portrait;
    }

    public void setPortrait(OCRIdCardDict portrait) {
        this.portrait = portrait;
    }

    public OCRIdCardDict getBirthDay() {
        return birthDay;
    }

    public void setBirthDay(OCRIdCardDict birthDay) {
        this.birthDay = birthDay;
    }

    public OCRIdCardDict getNationality() {
        return nationality;
    }

    public void setNationality(OCRIdCardDict nationality) {
        this.nationality = nationality;
    }

    public OCRIdCardDict getBirthYear() {
        return birthYear;
    }

    public void setBirthYear(OCRIdCardDict birthYear) {
        this.birthYear = birthYear;
    }

    public Legality getLegality() {
        return legality;
    }

    public void setLegality(Legality legality) {
        this.legality = legality;
    }

    public OCRIdCardDict getIssuedBy() {
        return issuedBy;
    }

    public void setIssuedBy(OCRIdCardDict issuedBy) {
        this.issuedBy = issuedBy;
    }

    public OCRIdCardDict getValidDateEnd() {
        return validDateEnd;
    }

    public void setValidDateEnd(OCRIdCardDict validDateEnd) {
        this.validDateEnd = validDateEnd;
    }

    public OCRIdCardDict getValidDateStart() {
        return validDateStart;
    }

    public void setValidDateStart(OCRIdCardDict validDateStart) {
        this.validDateStart = validDateStart;
    }
}
